"""
密码和邮箱修改模型
"""
from pydantic import BaseModel, EmailStr, Field

class PasswordChange(BaseModel):
    """修改密码"""
    old_password: str = Field(..., description="旧密码")
    new_password: str = Field(..., min_length=8, description="新密码（至少8位）")

class EmailChange(BaseModel):
    """修改邮箱"""
    new_email: EmailStr = Field(..., description="新邮箱地址")

